package com.boomcat.boomcat.result;

import lombok.AllArgsConstructor;

import lombok.NoArgsConstructor;

@AllArgsConstructor
@NoArgsConstructor
public enum ExceptionCode {
    /**
     * NON-EXISTENT 不存在型
     */
    NON_EXISTENT_ACCOUNT(10001,"账号不存在"),
    /**
     * ILLEGAL 非法型
     */
    ILLEGAL_ACCOUNT(10101,"账号非法"),
    ILLEGAL_PASSWORD(10102, "密码非法"),
    ILLEGAL_NICKNAME(10102, "昵称非法"),
    /**
     * WRONG 错误型
     */
    WRONG_CAPTCHA(10201, "验证码错误"),
    WRONG_PASSWORD(10202, "密码错误"),
    WRONG_NETWORK(10202, "网络错误"),
    WRONG_JWT_TOKEN(10202, "JWT Token错误，谨防恶意攻击，爱护网络环境"),
    WRONG_SENDING_CAPTCHA_EMAIL(10202, "发送验证码邮件失败"),
    /**
     * TOO LONG or SHORT 过度型
     */
    TOO_SHORT_PASSWORD(10301,"密码太短"),
    TOO_SHORT_NICKNAME(10301,"昵称太短"),
    TOO_LONG_PASSWORD(10302,"密码太长"),
    TOO_LONG_NICKNAME(10302,"昵称太长"),
    TOO_LONG_MATCHING_TIME(10302,"匹配时间太长"),
    /**
     * ALREADY 已经做过型
     */
    ALREADY_REGISTERED(10401,"账号已被注册"),
    ALREADY_LOGIN(10401,"账号已经登录"),
    ALREADY_EXISTED_NICKNAME(10401,"昵称已经存在"),
    /**
     * NON ENOUGH
     */
    NON_ENOUGH_PLAYERS(10501, "游玩人数不足"),
    /**
     * LOSS
     */
    LOST_CONNECTION(10601, "玩家掉线"),
    QUIT_GAME(10602,"玩家退出游戏"),
    /**
     * FREQUENCY 频繁型
     */
    FREQUENCY_OPERATION(10701,"频繁操作");
    int code;
    String description;
}
